
import java.util.*;
public class MaxMin {
	public static void main(String args[])
	{
		int counter =0;
		int[] arr=new int[5];
			
		
		System.out.println("enter 5 numbers");
		
		while(counter<5)
		{
		Scanner scan1= new Scanner(System.in);
		arr[counter]=scan1.nextInt();

		counter++;		
		}
		int max=arr[0];
		int min=arr[0];
		
		for(int i=1; i< arr.length; i++)
        {
                if(arr[i] > max)
                        max = arr[i];
                else if (arr[i] < min)
                        min = arr[i];
               
        }
       
        System.out.println("Largest Number is : " + max);
        System.out.println("Smallest Number is : " + min);
	}
	

}
